package com.it.myd.help;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class ReadOutFileHelper {
    public static String getOutFileContent(String outFilePath) {
        // 指定文件的路径
        StringBuilder outFileContent = new StringBuilder();

        // 使用BufferedReader来读取文件
        try (BufferedReader reader = new BufferedReader(new FileReader(outFilePath))) {
            String line;
            // 逐行读取文件内容
            while ((line = reader.readLine()) != null) {
                outFileContent.append(line).append(System.lineSeparator());
            }
        } catch (IOException e) {
            // 异常处理
            e.printStackTrace();
        }
        return outFileContent.toString();
    }


}
